# Seaborn visualization library
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from pandas import read_excel
from pandas import DataFrame
#****** Running Forecast for Plot 1 ******* Note: Data has been QC-ed
#read Plot 1 data
data = read_excel('../plotData/SkyLine_QC0.xlsx', sheet_name='Flux') #index_col=13, parse_dates=[13]
plot_file_path="../plotImages/"
data
data.columns
#Drop columns that are not required
#df.drop(['B', 'C'], axis=1)
data.drop(['QC', 'DailyRep', 'Date', 'pv', 'unit', 'r2', 'nrmse', 'podpu', 'epoch_time'], axis=1, inplace=True)
data
#Plot the gases separately across all the plots
#Filter out CO2
data_CO2 = data[data['ghg'] == 'CO2_dry']
#Get CH4 and NO2 together
data_CH4_NO2 = data[data['ghg'] != 'CO2_dry']
data_CH4_NO2
#Plot the gases separately across all the plots - CH4 and NO2 together (since they are in the same unit)
# and CO2 separately (since in different unit)
fig, axs = plt.subplots(nrows=2, figsize=(20,12))
#fig, axs = plt.subplots(1,2)
sns.boxenplot("Plot_ID", "flux", "ghg", data_CH4_NO2, ax=axs[0]) #height=8, aspect=2
#set title
plt.suptitle('Gas Flux across all the plots [1-36] / CH4 and NO2 only', size=22)
sns.boxenplot("Plot_ID", "flux", "ghg", data_CO2, ax=axs[1])
#set title
plt.suptitle('Gas Flux across all the plots [1-36] / per ghg', size=22)
plt.close(2)
plt.close(3)
#Save boxplot as a file
#output file name
output_file_name = "../plotImages/allPlots1/AllPlots_gasflux_perghg_catplot.png"
plot_file_name = plot_file_path + output_file_name
# save as png
plt.savefig(plot_file_name, dpi=80, bbox_inches='tight')
plt.show()
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
##plot the different data frames - #Plot all data across all the plots - all 3 gases together
##data[data['Plot_ID'] == 1] boolean indexing
#plt.figure(figsize=(100, 80))
#plt.suptitle('Gas Flux across all the Plots (1-36) - line plot', color='black', size=75)
#plt.subplot(941)
#plt.xticks(rotation=30, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 1', color='green', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 1]['DateTime'], data[data['Plot_ID'] == 1]['flux'], color='green')
#plt.subplot(942)
#plt.xticks(rotation=30, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 2', color='green', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 2]['DateTime'], data[data['Plot_ID'] == 2]['flux'], color='green')
#plt.subplot(943)
#plt.xticks(rotation=30, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 3', color='green', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 3]['DateTime'], data[data['Plot_ID'] == 3]['flux'], color='green')
#plt.subplot(944)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 4', color='green', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 4]['DateTime'], data[data['Plot_ID'] == 4]['flux'], color='green')
#plt.subplot(945)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 5', color='blue', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 5]['DateTime'], data[data['Plot_ID'] == 5]['flux'], color='blue')
#plt.subplot(946)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 6', color='blue', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 6]['DateTime'], data[data['Plot_ID'] == 6]['flux'], color='blue')
#plt.subplot(947)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 7', color='blue', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 7]['DateTime'], data[data['Plot_ID'] == 7]['flux'], color='blue')
#plt.subplot(948)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 8', color='blue', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 8]['DateTime'], data[data['Plot_ID'] == 8]['flux'], color='blue')
#plt.subplot(949)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 9', color='red', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 9]['DateTime'], data[data['Plot_ID'] == 9]['flux'], color='red')
#plt.subplot(9,4,10)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 10', color='red', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 10]['DateTime'], data[data['Plot_ID'] == 10]['flux'], color='red')
#plt.subplot(9,4,11)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 11', color='red', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 11]['DateTime'], data[data['Plot_ID'] == 11]['flux'], color='red')
#plt.subplot(9,4,12)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 12', color='red', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 12]['DateTime'], data[data['Plot_ID'] == 12]['flux'], color='red')
#plt.subplot(9,4,13)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 13', color='#7F00FF', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 13]['DateTime'], data[data['Plot_ID'] == 13]['flux'], color='#7F00FF')
#plt.subplot(9,4,14)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 14', color='#7F00FF', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 14]['DateTime'], data[data['Plot_ID'] == 14]['flux'], color='#7F00FF')
#plt.subplot(9,4,15)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 15', color='#7F00FF', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 15]['DateTime'], data[data['Plot_ID'] == 15]['flux'], color='#7F00FF')
#plt.subplot(9,4,16)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 16', color='#7F00FF', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 16]['DateTime'], data[data['Plot_ID'] == 16]['flux'], color='#7F00FF')
#plt.subplot(9,4,17)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 17', color='#0066CC', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 17]['DateTime'], data[data['Plot_ID'] == 17]['flux'], color='#0066CC')
#plt.subplot(9,4,18)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 18', color='#0066CC', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 18]['DateTime'], data[data['Plot_ID'] == 18]['flux'], color='#0066CC')
#plt.subplot(9,4,19)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 19', color='#0066CC', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 19]['DateTime'], data[data['Plot_ID'] == 19]['flux'], color='#0066CC')
#plt.subplot(9,4,20)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 20', color='#0066CC', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 20]['DateTime'], data[data['Plot_ID'] == 20]['flux'], color='#0066CC')
#plt.subplot(9,4,21)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 21', color='#CC6600', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 21]['DateTime'], data[data['Plot_ID'] == 21]['flux'], color='#CC6600')
#plt.subplot(9,4,22)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 22', color='#CC6600', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 22]['DateTime'], data[data['Plot_ID'] == 22]['flux'], color='#CC6600')
#plt.subplot(9,4,23)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 23', color='#CC6600', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 23]['DateTime'], data[data['Plot_ID'] == 23]['flux'], color='#CC6600')
#plt.subplot(9,4,24)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 24', color='#CC6600', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 24]['DateTime'], data[data['Plot_ID'] == 24]['flux'], color='#CC6600')
#plt.subplot(9,4,25)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 25', color='#990099', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 25]['DateTime'], data[data['Plot_ID'] == 25]['flux'], color='#990099')
#plt.subplot(9,4,26)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 26', color='#990099', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 26]['DateTime'], data[data['Plot_ID'] == 26]['flux'], color='#990099')
#plt.subplot(9,4,27)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 27', color='#990099', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 27]['DateTime'], data[data['Plot_ID'] == 27]['flux'], color='#990099')
#plt.subplot(9,4,28)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 28', color='#990099', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 28]['DateTime'], data[data['Plot_ID'] == 28]['flux'], color='#990099')
#plt.subplot(9,4,29)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 29', color='#000099', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 29]['DateTime'], data[data['Plot_ID'] == 29]['flux'], color='#000099')
#plt.subplot(9,4,30)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 30', color='#000099', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 30]['DateTime'], data[data['Plot_ID'] == 30]['flux'], color='#000099')
#plt.subplot(9,4,31)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 31', color='#000099', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 31]['DateTime'], data[data['Plot_ID'] == 31]['flux'], color='#000099')
#plt.subplot(9,4,32)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 32', color='#000099', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 32]['DateTime'], data[data['Plot_ID'] == 32]['flux'], color='#000099')
#plt.subplot(9,4,33)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 33', color='#202020', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 33]['DateTime'], data[data['Plot_ID'] == 33]['flux'], color='#202020')
#plt.subplot(9,4,34)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 34', color='#202020', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 34]['DateTime'], data[data['Plot_ID'] == 34]['flux'], color='#202020')
#plt.subplot(9,4,35)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 35', color='#202020', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 35]['DateTime'], data[data['Plot_ID'] == 35]['flux'], color='#202020')
#plt.subplot(9,4,36)
#plt.xticks(rotation=40, ha='right', fontsize=45)
#plt.yticks(fontsize=45)
#plt.title('Plot 36', color='#202020', fontsize=45)
#plt.plot(data[data['Plot_ID'] == 36]['DateTime'], data[data['Plot_ID'] == 36]['flux'], color='#202020')
#plt.tight_layout()
#plt.subplots_adjust(left=0.125,
# bottom=0.1,
# right=0.9,
# top=0.9,
# wspace=0.4,
# hspace=0.95)
##Save boxplot as a file
##output file name
#output_file_name = "../plotImages/allPlots1/AllPlots_gasflux.png"
#plot_file_name = plot_file_path + output_file_name
## save as png
#plt.savefig(plot_file_name, dpi=100, bbox_inches='tight')
#plt.show()
#plot the different data frames - #Plot all data across all the plots (by DATETIME)- N2O_dry
#Filter data to reflect each separate greenhouse gas
data_N2Odry = data[data['ghg'] == 'N2O_dry']
plt.figure(figsize=(100, 80))
plt.suptitle('Gas Flux across all the Plots (1-36) / N2O_dry - line plot', color='black', size=75, fontweight="bold", y=0.98)
plt.subplot(941)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 1', color='green', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 1]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 1]['flux'], color='green')
plt.subplot(942)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 2', color='green', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 2]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 2]['flux'], color='green')
plt.subplot(943)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 3', color='green', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 3]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 3]['flux'], color='green')
plt.subplot(944)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 4', color='green', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 4]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 4]['flux'], color='green')
plt.subplot(945)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 5', color='blue', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 5]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 5]['flux'], color='blue')
plt.subplot(946)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 6', color='blue', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 6]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 6]['flux'], color='blue')
plt.subplot(947)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 7', color='blue', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 7]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 7]['flux'], color='blue')
plt.subplot(948)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 8', color='blue', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 8]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 8]['flux'], color='blue')
plt.subplot(949)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 9', color='red', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 9]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 9]['flux'], color='red')
plt.subplot(9,4,10)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 10', color='red', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 10]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 10]['flux'], color='red')
plt.subplot(9,4,11)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=35)
plt.title('Plot 11', color='red', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 11]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 11]['flux'], color='red')
plt.subplot(9,4,12)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 12', color='red', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 12]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 12]['flux'], color='red')
plt.subplot(9,4,13)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 13', color='#7F00FF', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 13]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 13]['flux'], color='#7F00FF')
plt.subplot(9,4,14)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 14', color='#7F00FF', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 14]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 14]['flux'], color='#7F00FF')
plt.subplot(9,4,15)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 15', color='#7F00FF', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 15]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 15]['flux'], color='#7F00FF')
plt.subplot(9,4,16)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 16', color='#7F00FF', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 16]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 16]['flux'], color='#7F00FF')
plt.subplot(9,4,17)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 17', color='#0066CC', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 17]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 17]['flux'], color='#0066CC')
plt.subplot(9,4,18)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 18', color='#0066CC', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 18]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 18]['flux'], color='#0066CC')
plt.subplot(9,4,19)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 19', color='#0066CC', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 19]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 19]['flux'], color='#0066CC')
plt.subplot(9,4,20)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 20', color='#0066CC', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 20]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 20]['flux'], color='#0066CC')
plt.subplot(9,4,21)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 21', color='#CC6600', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 21]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 21]['flux'], color='#CC6600')
plt.subplot(9,4,22)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 22', color='#CC6600', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 22]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 22]['flux'], color='#CC6600')
plt.subplot(9,4,23)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 23', color='#CC6600', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 23]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 23]['flux'], color='#CC6600')
plt.subplot(9,4,24)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 24', color='#CC6600', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 24]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 24]['flux'], color='#CC6600')
plt.subplot(9,4,25)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 25', color='#990099', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 25]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 25]['flux'], color='#990099')
plt.subplot(9,4,26)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 26', color='#990099', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 26]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 26]['flux'], color='#990099')
plt.subplot(9,4,27)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 27', color='#990099', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 27]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 27]['flux'], color='#990099')
plt.subplot(9,4,28)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 28', color='#990099', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 28]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 28]['flux'], color='#990099')
plt.subplot(9,4,29)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=35)
plt.title('Plot 29', color='#000099', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 29]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 29]['flux'], color='#000099')
plt.subplot(9,4,30)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 30', color='#000099', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 30]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 30]['flux'], color='#000099')
plt.subplot(9,4,31)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 31', color='#000099', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 31]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 31]['flux'], color='#000099')
plt.subplot(9,4,32)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 32', color='#000099', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 32]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 32]['flux'], color='#000099')
plt.subplot(9,4,33)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 33', color='#202020', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 33]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 33]['flux'], color='#202020')
plt.subplot(9,4,34)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 34', color='#202020', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 34]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 34]['flux'], color='#202020')
plt.subplot(9,4,35)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 35', color='#202020', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 35]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 35]['flux'], color='#202020')
plt.subplot(9,4,36)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 36', color='#202020', fontsize=45)
plt.plot(data_N2Odry[data_N2Odry['Plot_ID'] == 36]['DateTime'], data_N2Odry[data_N2Odry['Plot_ID'] == 36]['flux'], color='#202020')
#fig.tight_layout(rect=[0, 0.03, 1, 0.95])
plt.tight_layout()
plt.subplots_adjust(left=0.125,
bottom=0.1,
right=0.9,
top=0.9,
wspace=0.4,
hspace=1.45)
#Save boxplot as a file
#output file name
output_file_name = "../plotImages/allPlots1/AllPlots_gasflux_N2O.png"
plot_file_name = plot_file_path + output_file_name
# save as png
plt.savefig(plot_file_name, dpi=100, bbox_inches='tight')
plt.show()
#plot the different data frames - #Plot all data across all the plots (by DATETIME)- CH4_dry
#Filter data to reflect each separate greenhouse gas
data_CH4dry = data[data['ghg'] == 'CH4_dry']
plt.figure(figsize=(100, 80))
plt.suptitle('Gas Flux across all the Plots (1-36) / CH4_dry - line plot', color='black', size=75, fontweight="bold", y=0.98)
plt.subplot(941)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 1', color='green', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 1]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 1]['flux'], color='green')
plt.subplot(942)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 2', color='green', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 2]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 2]['flux'], color='green')
plt.subplot(943)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 3', color='green', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 3]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 3]['flux'], color='green')
plt.subplot(944)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 4', color='green', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 4]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 4]['flux'], color='green')
plt.subplot(945)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 5', color='blue', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 5]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 5]['flux'], color='blue')
plt.subplot(946)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 6', color='blue', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 6]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 6]['flux'], color='blue')
plt.subplot(947)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 7', color='blue', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 7]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 7]['flux'], color='blue')
plt.subplot(948)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 8', color='blue', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 8]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 8]['flux'], color='blue')
plt.subplot(949)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 9', color='red', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 9]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 9]['flux'], color='red')
plt.subplot(9,4,10)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 10', color='red', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 10]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 10]['flux'], color='red')
plt.subplot(9,4,11)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 11', color='red', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 11]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 11]['flux'], color='red')
plt.subplot(9,4,12)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 12', color='red', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 12]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 12]['flux'], color='red')
plt.subplot(9,4,13)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 13', color='#7F00FF', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 13]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 13]['flux'], color='#7F00FF')
plt.subplot(9,4,14)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 14', color='#7F00FF', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 14]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 14]['flux'], color='#7F00FF')
plt.subplot(9,4,15)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 15', color='#7F00FF', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 15]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 15]['flux'], color='#7F00FF')
plt.subplot(9,4,16)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 16', color='#7F00FF', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 16]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 16]['flux'], color='#7F00FF')
plt.subplot(9,4,17)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 17', color='#0066CC', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 17]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 17]['flux'], color='#0066CC')
plt.subplot(9,4,18)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 18', color='#0066CC', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 18]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 18]['flux'], color='#0066CC')
plt.subplot(9,4,19)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 19', color='#0066CC', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 19]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 19]['flux'], color='#0066CC')
plt.subplot(9,4,20)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 20', color='#0066CC', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 20]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 20]['flux'], color='#0066CC')
plt.subplot(9,4,21)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 21', color='#CC6600', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 21]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 21]['flux'], color='#CC6600')
plt.subplot(9,4,22)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 22', color='#CC6600', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 22]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 22]['flux'], color='#CC6600')
plt.subplot(9,4,23)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 23', color='#CC6600', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 23]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 23]['flux'], color='#CC6600')
plt.subplot(9,4,24)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 24', color='#CC6600', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 24]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 24]['flux'], color='#CC6600')
plt.subplot(9,4,25)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 25', color='#990099', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 25]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 25]['flux'], color='#990099')
plt.subplot(9,4,26)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 26', color='#990099', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 26]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 26]['flux'], color='#990099')
plt.subplot(9,4,27)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 27', color='#990099', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 27]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 27]['flux'], color='#990099')
plt.subplot(9,4,28)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 28', color='#990099', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 28]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 28]['flux'], color='#990099')
plt.subplot(9,4,29)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 29', color='#000099', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 29]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 29]['flux'], color='#000099')
plt.subplot(9,4,30)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 30', color='#000099', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 30]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 30]['flux'], color='#000099')
plt.subplot(9,4,31)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 31', color='#000099', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 31]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 31]['flux'], color='#000099')
plt.subplot(9,4,32)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 32', color='#000099', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 32]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 32]['flux'], color='#000099')
plt.subplot(9,4,33)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 33', color='#202020', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 33]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 33]['flux'], color='#202020')
plt.subplot(9,4,34)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 34', color='#202020', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 34]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 34]['flux'], color='#202020')
plt.subplot(9,4,35)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 35', color='#202020', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 35]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 35]['flux'], color='#202020')
plt.subplot(9,4,36)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 36', color='#202020', fontsize=45)
plt.plot(data_CH4dry[data_CH4dry['Plot_ID'] == 36]['DateTime'], data_CH4dry[data_CH4dry['Plot_ID'] == 36]['flux'], color='#202020')
plt.tight_layout()
plt.subplots_adjust(left=0.125,
bottom=0.1,
right=0.9,
top=0.9,
wspace=0.4,
hspace=1.45)
#Save boxplot as a file
#output file name
output_file_name = "../plotImages/allPlots1/AllPlots_gasflux_CH4.png"
plot_file_name = plot_file_path + output_file_name
# save as png
plt.savefig(plot_file_name, dpi=250, bbox_inches='tight')
plt.show()
#plot the different data frames - #Plot all data across all the plots (by DATETIME)- CO2_dry
#Filter data to reflect each separate greenhouse gas
data_CO2dry = data[data['ghg'] == 'CO2_dry']
plt.figure(figsize=(100, 80))
plt.suptitle('Gas Flux across all the Plots (1-36) / CO2_dry - line plot', color='black', size=75, fontweight="bold", y=0.98)
plt.subplot(941)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 1', color='green', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 1]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 1]['flux'], color='green')
plt.subplot(942)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 2', color='green', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 2]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 2]['flux'], color='green')
plt.subplot(943)
plt.xticks(rotation=30, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 3', color='green', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 3]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 3]['flux'], color='green')
plt.subplot(944)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 4', color='green', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 4]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 4]['flux'], color='green')
plt.subplot(945)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 5', color='blue', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 5]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 5]['flux'], color='blue')
plt.subplot(946)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 6', color='blue', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 6]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 6]['flux'], color='blue')
plt.subplot(947)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 7', color='blue', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 7]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 7]['flux'], color='blue')
plt.subplot(948)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 8', color='blue', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 8]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 8]['flux'], color='blue')
plt.subplot(949)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 9', color='red', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 9]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 9]['flux'], color='red')
plt.subplot(9,4,10)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 10', color='red', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 10]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 10]['flux'], color='red')
plt.subplot(9,4,11)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 11', color='red', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 11]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 11]['flux'], color='red')
plt.subplot(9,4,12)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 12', color='red', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 12]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 12]['flux'], color='red')
plt.subplot(9,4,13)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 13', color='#7F00FF', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 13]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 13]['flux'], color='#7F00FF')
plt.subplot(9,4,14)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 14', color='#7F00FF', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 14]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 14]['flux'], color='#7F00FF')
plt.subplot(9,4,15)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 15', color='#7F00FF', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 15]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 15]['flux'], color='#7F00FF')
plt.subplot(9,4,16)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 16', color='#7F00FF', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 16]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 16]['flux'], color='#7F00FF')
plt.subplot(9,4,17)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 17', color='#0066CC', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 17]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 17]['flux'], color='#0066CC')
plt.subplot(9,4,18)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 18', color='#0066CC', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 18]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 18]['flux'], color='#0066CC')
plt.subplot(9,4,19)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 19', color='#0066CC', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 19]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 19]['flux'], color='#0066CC')
plt.subplot(9,4,20)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 20', color='#0066CC', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 20]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 20]['flux'], color='#0066CC')
plt.subplot(9,4,21)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 21', color='#CC6600', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 21]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 21]['flux'], color='#CC6600')
plt.subplot(9,4,22)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 22', color='#CC6600', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 22]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 22]['flux'], color='#CC6600')
plt.subplot(9,4,23)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 23', color='#CC6600', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 23]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 23]['flux'], color='#CC6600')
plt.subplot(9,4,24)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 24', color='#CC6600', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 24]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 24]['flux'], color='#CC6600')
plt.subplot(9,4,25)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 25', color='#990099', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 25]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 25]['flux'], color='#990099')
plt.subplot(9,4,26)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 26', color='#990099', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 26]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 26]['flux'], color='#990099')
plt.subplot(9,4,27)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 27', color='#990099', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 27]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 27]['flux'], color='#990099')
plt.subplot(9,4,28)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 28', color='#990099', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 28]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 28]['flux'], color='#990099')
plt.subplot(9,4,29)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 29', color='#000099', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 29]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 29]['flux'], color='#000099')
plt.subplot(9,4,30)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 30', color='#000099', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 30]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 30]['flux'], color='#000099')
plt.subplot(9,4,31)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 31', color='#000099', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 31]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 31]['flux'], color='#000099')
plt.subplot(9,4,32)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 32', color='#000099', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 32]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 32]['flux'], color='#000099')
plt.subplot(9,4,33)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 33', color='#202020', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 33]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 33]['flux'], color='#202020')
plt.subplot(9,4,34)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 34', color='#202020', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 34]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 34]['flux'], color='#202020')
plt.subplot(9,4,35)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 35', color='#202020', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 35]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 35]['flux'], color='#202020')
plt.subplot(9,4,36)
plt.xticks(rotation=40, ha='right', fontsize=45)
plt.yticks(fontsize=45)
plt.title('Plot 36', color='#202020', fontsize=45)
plt.plot(data_CO2dry[data_CO2dry['Plot_ID'] == 36]['DateTime'], data_CO2dry[data_CO2dry['Plot_ID'] == 36]['flux'], color='#202020')
plt.tight_layout()
plt.subplots_adjust(left=0.125,
bottom=0.1,
right=0.9,
top=0.9,
wspace=0.4,
hspace=1.45)
#Save boxplot as a file
#output file name
output_file_name = "../plotImages/allPlots1/AllPlots_gasflux_CO2.png"
plot_file_name = plot_file_path + output_file_name
# save as png
plt.savefig(plot_file_name, dpi=250, bbox_inches='tight')
plt.show()
from IPython.display import HTML
HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide();
} else {
$('div.input').show();
}
code_show = !code_show
}
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>''')